<?php require_once('ini.php');?>
<link href="../css/Quantricss.css" rel="stylesheet" type="text/css">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>


<?php
	
    require_once ("../mysql.php");
    require_once ("function_quantri.php");
    
    $danhsach = danhsach_sp();
?>
<a href="admintrangchu/index.php"><img src="admintrangchu/images/home.png">
<table width ="100%" border="1" align="center">
    <tr>
        <td colspan="8" align="center" bgcolor="#0000FF"><span class="style1">Danh sách sản phẩm</span></td>
    </tr>    
    <tr>
        <td width="80" align="center"><span class="style2">idSP</span></td>
        <td width="102" align="center"><span class="style2">TenSP</span></td>
        <td width="162" align="center"><span class="style2">Chủng loại</span></td>
        <td width="81" align="center"><span class="style2">Loại SP</span></td>
        <td width="204" align="center"><span class="style2">Mô Tả</span></td>
        <td width="62" align="center"><span class="style2">UrlHinh</span></td>
        <td width="162" align="center"><span class="style2">Mới</span></td>
        <td width="162" align="center"><a href="Sanpham_them_quantri.php">Thêm</a> - <a href="Sanpham_thuoctinh.php?">Chi tiết thuộc tính SP</a></td>
    </tr>
    
           

    
  <?php 
    while ($rows_sp = mysql_fetch_array($danhsach))
    {
  ?>  
    <tr bgcolor="#F7E8AF">
        <td><?php echo $rows_sp['idSP']?></td>
        <td><?php echo $rows_sp['TenSP']?></td>
        <td><?php echo $rows_sp['TenCL']?></td>
        <td><?php echo $rows_sp['TenLoai']?></td>
        <td><?php echo $rows_sp['MoTa']?></td>
        <td> <img src ="../upload/sanpham/hinhchinh/<?php echo $rows_sp['UrlHinh']?>" width="100" height="100" align="center"></td>
        <td align="center"><?php echo $rows_sp['New']?></td>
        <td><a href="Sanpham_xoa_quantri.php?idSP=<?php echo $rows_sp['idSP']?>"  onclick="return confirm('Bạn có muốn xóa dữ liệu này không ?')">Xóa</a> -
            <a href="sanpham_update_quantri.php?idSP=<?php echo $rows_sp['idSP']?> "onclick="return confirm('Bạn có muốn update dữ liệu này không ?')">Sửa</a> -
            <a href="Sanpham_quantri_thuoctinh.php?idSP=<?php echo $rows_sp['idSP']?>">Chi tiết</a>
        </td>
    </tr>
    <?php }?>
</table>
		
    

